<!DOCTYPE html>
<html>
<head>
    <title>聊天</title>
    <link href="/assets/css/bootstrap.min.css" id="bootstrap-style" rel="stylesheet" type="text/css" />
    <link href="/assets/css/chat.css" rel="stylesheet" type="text/css" />
</head>
<body>
    <input type="text" id="usernameInput" placeholder="请输入姓名（账号）" />
    <button  onclick="connectWebSocket()" type="button" class="btn btn-primary btn-lg">连接</button>
    <input type="text" id="messageInput" placeholder="请输入消息.." disabled />
            <button  onclick="sendMessage()" type="button" class="btn btn-success btn-lg" disabled >发送</button>
    <div id="chatContainer">
        <div>
            <h4>在线用户</h4>
            <ul id="onlineUsers"></ul>
        </div>
        <div>
            <h4>聊天对话框</h4>
            <div id="chatMessages"></div>
        </div>
        
    </div>


    <!-- Modal -->
<div class="modal fade" id="alertModal" tabindex="-1" aria-labelledby="exampleModalLabel" aria-hidden="true">
    <div class="modal-dialog">
      <div class="modal-content">
        <div class="modal-header">
          <h5 class="modal-title" id="exampleModalLabel">警告</h5>
          <button type="button" class="close" data-dismiss="modal" aria-label="Close">
            <span aria-hidden="true">&times;</span>
          </button>
        </div>
        <div class="modal-body">
            <div class="alert alert-warning" role="alert">
                请输入账号或者姓名
              </div>
        </div>
        <div class="modal-footer">
          <button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
        </div>
      </div>
    </div>
  </div>
    
    

    <script src="/assets/js/chat.js"></script>
    <script src="/assets/js/jquery/jquery.min.js"></script>
    <script src="/assets/js/bootstrap/js/bootstrap.bundle.min.js"></script>
</body>
</html>
